<!DOCTYPE HTML>
<html lang="ru">
<head>
    <title>bazBlog - Main Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <nav class="navbar bg-body-tertiary">
        <div class="container-fluid">
            <a class="navbar-brand">Navbar</a>
            <form class="d-flex" role="search" action="filter" method="post">
                <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="filter">
                <input type="hidden" name="_csrf" value="{{ _csrf.token }}" />
                <button class="btn btn-outline-success" type="submit">Search</button>
            </form>
        </div>
    </nav>
    <div class="row">
        <div class="col-md-4">
            <nav class="nav flex-column">
                <a class="nav-link active" aria-current="page" href="#">Main</a>
                <a class="nav-link" href="#">Posts</a>
                <a class="nav-link" href="#">Groups</a>
                <a class="nav-link" href="#">Profile</a>
            </nav>
            <form th:action="/logout" method="post">
                <input type="submit" value="Sign Out"/>
                <input type="hidden" name="_csrf" value="{{ _csrf.token }}" />
            </form>
        </div>
        <div class="col-md-8 overflow-auto">
            <div>
                <form method="post">
                    <input type="text" name="title" placeholder="Write Title..."/>
                    <input type="text" name="text" placeholder="Write post's text"/>
                    <input type="hidden" name="_csrf" value="{{ _csrf.token }}" />
                    <button class="btn btn-primary" type="submit">+</button>
                </form>
            </div>
            {{#posts}}
                <div class="card w-75 mb-3">
                    <div class="card-body">
                        <h5 class="card-title">{{titlePost}}</h5>
                        <p class="card-text">{{textPost}}</p>
                        <a href="#" class="btn btn-primary">Button</a>
                    </div>
                </div>
            {{/posts}}
        </div>
    </div>
</div>


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>